/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package im.resources.monitors;

/**
 *
 * @author brownstone
 */
public class DiskMonitor {
private float disk,diskOld;

	public DiskMonitor() {

		disk = (float)(Math.random());
		diskOld = disk;
	}

	public float check(){

		if ( ((int)(Math.random()*1000) % 100) < 1)
			disk = (float)(Math.random());

		else
			disk = 0.95f * diskOld + 0.05f * (float)(Math.random());


		diskOld = disk;

	//	System.out.println("Valore disk = "+disk);
		return disk;
	}
}
